Expand description

Types for representing Rust types in a more dynamic form that is similar to JSON or Lua values.

Structs

Specify various options for FromDynamic::from_dynamic

Enums

We’d like to avoid allocating when resolving struct fields, so this is the borrowed version of Value. It’s a bit involved to make this work; more details can be found in the excellent guide here: https://github.com/sunshowers/borrow-complex-key-example/blob/master/src/lib.rs

Specify how FromDynamic will treat unknown fields when converting from Value to a given target type

Represents values of various possible other types. Value is intended to be convertible to the same set of types as Lua and is a superset of the types possible in TOML and JSON.

Traits

The FromDynamic trait allows a type to construct itself from a Value. This trait can be derived.

The PlaceDynamic trait is used by derived implementations of FromDynamic to implement flattened conversions. Deriving FromDynamic for a struct will usually also derive PlaceDynamic for the same struct. You do not typically consume PlaceDynamic directly.

The ToDynamic trait allows a type to emit a representation of itself as the Value type. This trait can be derived.

Derive Macros